package com.ruoyi.wq.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wq.mapper.WqTaskMapper;
import com.ruoyi.wq.domain.WqTask;
import com.ruoyi.wq.service.IWqTaskService;

/**
 * 任务Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-08
 */
@Service
public class WqTaskServiceImpl extends ServiceImpl<WqTaskMapper, WqTask> implements IWqTaskService {

    @Autowired
    private WqTaskMapper wqTaskMapper;

    /**
     * 查询任务
     * 
     * @param id 任务主键
     * @return 任务
     */
    @Override
    public WqTask selectWqTaskById(String id)
    {
        return wqTaskMapper.selectWqTaskById(id);
    }

    /**
     * 查询任务列表
     * 
     * @param wqTask 任务
     * @return 任务
     */
    @Override
    public List<WqTask> selectWqTaskList(WqTask wqTask)
    {
        return wqTaskMapper.selectWqTaskList(wqTask);
    }

    /**
     * 新增任务
     * 
     * @param wqTask 任务
     * @return 结果
     */
    @Override
    public int insertWqTask(WqTask wqTask)
    {
        wqTask.setCreateTime(DateUtils.getNowDate());
        return wqTaskMapper.insertWqTask(wqTask);
    }

    /**
     * 修改任务
     * 
     * @param wqTask 任务
     * @return 结果
     */
    @Override
    public int updateWqTask(WqTask wqTask)
    {
        wqTask.setUpdateTime(DateUtils.getNowDate());
        return wqTaskMapper.updateWqTask(wqTask);
    }

    /**
     * 批量删除任务
     * 
     * @param ids 需要删除的任务主键
     * @return 结果
     */
    @Override
    public int deleteWqTaskByIds(String[] ids)
    {
        return wqTaskMapper.deleteWqTaskByIds(ids);
    }

    /**
     * 删除任务信息
     * 
     * @param id 任务主键
     * @return 结果
     */
    @Override
    public int deleteWqTaskById(String id)
    {
        return wqTaskMapper.deleteWqTaskById(id);
    }
}
